import {request} from './http'
// const BASE_URL = 'http://192.168.0.105/api/v1'
const BASE_URL = process.env.NODE_ENV=="development"?'http://sxc.jlxmall.com/api/v1':'http://sxc.jlxmall.com/api/v1'
//获取appid
export const getAppid = data => request('post',`${BASE_URL}/GetAppid`,data)
//获取微信授权
export const wechatLogin = data => request('post',`http://sxc.jlxmall.com/api/v1/vxlogin`,data)
//首页数据
export const index = data => request('post',`${BASE_URL}/index`,data)
//搜索商品列表
export const search = data => request('post',`${BASE_URL}/search`,data)
//商品详情
export const goodInfo = data =>request('post',`${BASE_URL}/detail`,data)
//商品添加到购物车
export const AddCart = data =>request('post',`${BASE_URL}/AddCart`,data)
//获取购物车列表
export const CartList  = data => request('post',`${BASE_URL}/CartList`,data)
//加减购物车商品数量
export const NumCart = data => request('post',`${BASE_URL}/NumCart`,data)
//获取购物车商品数量
export const CartNum = data => request('post',`${BASE_URL}/CartNum`,data)
//删除购物车
export const DelCart = data => request('post',`${BASE_URL}/DelCart`,data)
//获取地址列表
export const AddressList = data => request('post',`${BASE_URL}/AddressList`,data)
//获取一级分类
export const OneCategory = data => request('post',`${BASE_URL}/OneCategory`,data)
//获取二级分类
export const TwoCategory = data => request('post',`${BASE_URL}/TwoCategory`,data)
//获取三级分类及商品
export const ThreeCategory = data => request('post',`${BASE_URL}/ThreeCategory`,data)
// //获取购物车商品数量
// export const CartNum = data => request('post',`${BASE_URL}/CartNum`,data)
//获取小区站点
export const SearchSite = data => request('post',`${BASE_URL}/SearchSite`,data)
//新增地址
export const AddAddress = data => request('post',`${BASE_URL}/AddAddress`,data)
//修改地址
export const EditAddress = data => request('post',`${BASE_URL}/EditAddress`,data)
//删除地址
export const DelAddress = data => request('post',`${BASE_URL}/DelAddress`,data)